//我们可以将undefined赋值给void类型，也就是函数可以返回undefined
function sum(num1: number, num2: number): void {
  console.log(num1 + num2)
}

// 应用场景 用来指定函数类型的返回值是void
type LyricInfoType = { time: number, text: string }
function parseLyric(lyric: string): LyricInfoType[] {
  const lyricInfos: LyricInfoType[] = []
  return lyricInfos
}

const name: string = "aaa"

type FooType = () => void
const foo: FooType = () => { }


type ExecFnType = (...args: any[]) => void
function delayExecFn(fn: ExecFnType) {
  setTimeout(() => {
    fn("why", 10)
  }, 1000)
}

delayExecFn((name, age) => { console.log(name, age) })


export { }